<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改售后预约')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-customer-edit" th:object="${jtCustomerService}">
            <input name="serviceId" th:field="*{serviceId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{bookPhone}]]：</label>
                    <div class="col-sm-8">
                        <input th:value="*{countryCode}" class="form-control" type="text" readonly="readonly">
                        -
                        <input th:value="*{phoneNumber}" class="form-control" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{email}]]：</label>
                    <div class="col-sm-8">
                        <input th:value="*{email}" class="form-control" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{address}]]：</label>
                    <div class="col-sm-8">
                        <input th:field="*{fullAddress}" class="form-control" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{bookRepairTime}]]：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input th:value="${#dates.format(jtCustomerService.repairTime, 'yyyy-MM-dd')}" class="form-control" type="text" readonly="readonly">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{deviceModelNo}]]：</label>
                    <div class="col-sm-8">
                        <input th:field="*{deviceModelNo}" class="form-control" type="text" readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{faultProblem}]]：</label>
                    <div class="col-sm-8">
                        <textarea class="form-control" th:rows="5" readonly="readonly">[[*{problem}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{picture}]]1：</label>
                    <div class="col-sm-8">
                        <img th:src="*{imageUrl1}" width="300px" />
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{picture}]]2：</label>
                    <div class="col-sm-8">
                        <img th:src="*{imageUrl2}" width="300px" />
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{processingStatus}]]：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('jt_processing_status')}">
                            <input type="radio" th:id="${'repairStatus_' + dict.dictCode}" name="repairStatus" th:value="${dict.dictValue}" th:field="*{repairStatus}">
                            <label th:for="${'repairStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{repairResult}]]：</label>
                    <div class="col-sm-8">
                        <textarea name="repairResult" class="form-control" rows="5" required>[[*{repairResult}]]</textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "business/customer/repair";
        $("#form-customer-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/save", $('#form-customer-edit').serialize());
            }
        }
    </script>
</body>
</html>